package com.wingice.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 客户端信息表
 * </p>
 *
 * @author 胡昊
 * @since 2021-01-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "SysOauthClientDetails对象")
public class SysOauthClientDetails implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private String id;

    @Schema(description = "客户端ID")
    private String clientId;

    @Schema(description = "资源列表")
    private String resourceIds;

    @Schema(description = "客户端secret")
    private String clientSecret;

    @Schema(description = "域")
    private String scope;

    @Schema(description = "授权类型")
    private String authorizedGrantTypes;

    @Schema(description = "回调地址")
    private String webServerRedirectUri;

    @Schema(description = "授权")
    private String authorities;

    @Schema(description = "token失效时间")
    private Integer accessTokenValidity;

    @Schema(description = "refresh_token失效时间")
    private Integer refreshTokenValidity;

    @Schema(description = "附加信息")
    private String additionalInformation;

    @Schema(description = "自动接受")
    private String autoApprove;

    @Schema(description = "客户端名称")
    private String clientName;

    @Schema(description = "前缀")
    private String prefix;

    @Schema(description = "私钥")
    private String privateKey;

    @Schema(description = "公钥")
    private String publicKey;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Long createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private Long updateTime;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private String createBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新者")
    private String updateBy;

    @Version
    @Schema(description = "版本")
    private Long version;

    @TableLogic
    @Schema(description = "是否有效 0-未删除 1-已删除")
    private Integer deleted;

    @Schema(description = "额外信息")
    private String extra;

    @Schema(description = "租户id")
    private String tenantId;


}
